/*
 * @Description:
 * @version:
 * @Author: sunqian_sr
 * @Date: 2022-12-01 13:52:54
 * @LastEditors: Andy
 * @LastEditTime: 2023-02-09 17:17:43
 */
const parentRouter = [
  {
    label: '权限管理',
    path: ''
  }
]
const Menu = () => import('@/modules/auth/views/Menu.vue')
const Role = () => import('@/modules/auth/views/Role.vue')
const roleAuth = () => import('@/modules/auth/components/roleAuthorization.vue')
const Interface = () => import('@/modules/auth/views/Interface.vue')
const routes = [
  {
    path: '/authManage/menu',
    name: 'Menu',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '菜单管理',
      keepAlive: true,
      parentTitle: parentRouter
    },
    component: Menu
  },
  {
    path: '/authManage/role',
    name: 'Role',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '角色管理',
      keepAlive: true,
      parentTitle: parentRouter
    },
    component: Role
  },
  {
    path: '/authManage/role/authorization',
    name: 'roleAuth',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '角色权限',
      keepAlive: false,
      parentTitle: [...parentRouter, { label: '角色管理', path: '/authManage/role' }]
    },
    component: roleAuth
  },
  {
    path: '/authManage/interface',
    name: 'Interface',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '接口管理',
      keepAlive: true,
      parentTitle: parentRouter
    },
    component: Interface
  }
]
export default routes
